feat: Add a fully working toolchain#13
feat: Add a fully working toolchain#13nathaniel-brough wants to merge 2 commits intobazelembedded:mainfrom
Conversation
|
Got a little bit more work to clean up the UI. It does currently require |
|
Sorry for being slow on this front :) |
tpudlik
left a comment
There was a problem hiding this comment.
Regarding the compiler errors: could it be that some cxx_builtin_include_directories are still missing?
FWIW for Fuchsia clang (https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/clang) I would use,
"%package(@clang//)%/include/c++/v1/x86_64-unknown-linux-gnu/c++/v1",
"%package(@clang//)%/include/c++/v1",
"%package(@clang//)%/lib/clang/15.0.0/include",
"%package(@clang//)%/lib/clang/15.0.0/share",
I wonder if Fuchsia clang + Fuchsia sysroot (https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/sysroot) would work in CI.
| ACTION_NAME_GROUPS.all_cc_compile_actions: [ | ||
| "-nostdinc", | ||
| "-nostdinc++", | ||
| "-isystem/usr/include/c++/9", |
There was a problem hiding this comment.
Why are these include paths listed both here (in this default-enabled feature) and in cxx_builtin_include_directories?
I guess it's just not clear to me what this feature achieves: you first exclude built-in include paths, but then add them right back in?
There was a problem hiding this comment.
It's mostly a convenience thing to make sure I have consistent includes. Sometimes clang/gcc will change/add include directories depending on other flags. This is usually true for sanitizers. But it gets rather annoying having the compiler "autodetect" different include paths and having them not matching in bazel, not to mention the error messages when this happens are rather cryptic. You end up with a lot of blackbox inconsistencies between environments. But you are probably right, it's probably not 100% necessary here and adds unnecessary indirection.
It's also an intermediate precursor to having fully hermetic libraries as well. But we aren't quite there yet with the modular toolchains.
| runfiles = runfiles.merge_all([action_config_set[DefaultInfo].default_runfiles]) | ||
| transitive_files.append(action_config_set[DefaultInfo].files) | ||
|
|
||
| # Deduplicate features |
There was a problem hiding this comment.
nit: Deduplicate action_configs
Is the |
No description provided.